<!-- eslint-disable no-prototype-builtins -->
<!-- eslint-disable no-prototype-builtins -->
<template>
    <div>
        <button @click="isshow=!isshow">显示/隐藏</button>
        <transition name="hello" appear mode="">
            <h1 v-show="isshow" class="come">你好啊</h1>
        </transition>
    </div>
</template>

<script>
export default {
    name: "Test",
    //声明接收todo 
    data() {
        return {
            isshow:true
        }
    },
};
</script>

<style scoped>
h1{
    background-color: orange;
}
.hello-enter-active{
    animation: donghua 1s ;
}
.hello-leave-active{
    animation: donghua 1s reverse ;
}
@keyframes donghua {
    from{
        transform: translateX(-100%);
    }
    to{
        transform: translateX();
    }
}
</style>
